package com.pojo;

public class Text {
	public static void main(String[] args) {
		int a[]={1,20,9,4,7,12,28,8};
		for(int x=0;x<a.length-1;x++){
		for(int i=0;i<a.length-1;i++){
//			System.out.println(i);
			if(a[i]>a[i+1]){
				int b=a[i];
				a[i]=a[i+1];
				a[i+1]=b;
			}
			
			
		}
		//System.out.println(java.util.Arrays.toString(a));
		}
		System.out.println(java.util.Arrays.toString(a));
	}
	
}
